<template>
  <el-header height="56px">
    <div class="header_right">
      <span>
        {{ ctxData.configInfo.name }}
        <b>{{ ctxData.configInfo.version }}</b>
      </span>
      <div style="display: flex; align-items: center"></div>
    </div>
  </el-header>
</template>

<script setup>
import { User, CircleClose, SwitchButton } from '@element-plus/icons-vue'
import { reactive } from 'vue'
import { ElMessage, ElLoading } from 'element-plus'
const router = useRouter()

const ctxData = reactive({
  configInfo: {
    name: '4G网络模块',
    version: 'V0.0.1',
  },
  userName: '',
  pFlag: false,
})

//显示单个res结果，code不等于 '0' 的message
const showOneResMsg = (res) => {
  ElMessage({
    type: 'error',
    message: res.message,
  })
}
</script>

<style lang="scss" scoped>
.el-header {
  padding: 0 16px;
  border-bottom: 1px solid #ddd;
  display: flex;
  display: -webkit-flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  .header_left {
    flex: 1;
    font-size: 24px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header_right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    width: 100%;
    & > div i {
      padding: 8px 6px;
      font-size: 20px;
      cursor: pointer;
    }

    .user_info {
      margin: 0 8px;
      width: auto;
      text-align: right;
      cursor: pointer;
    }
    .el-avatar {
      vertical-align: middle;
    }
    span.username {
      vertical-align: middle;
      font-size: 12px;
      &:hover {
        color: #3054eb;
      }
    }
  }
}
</style>
